UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zwULBVmiqTNQXc15EKLyA4QLSHOpBQk8TmzI2bxbRVg='
WHERE
key_id = '8a958b4f88fe960d4069ed5ad2bff9945f6ab0b882744417ce082ffaf38de7cf'
AND (
token = 'zwULBVmiqTNQXc15EKLyA4QLSHOpBQk8TmzI2bxbRVg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)