UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8PLVnYnBAyRzwfate3DoIvx9jCs/CspaskmZKMO5puo='
WHERE
key_id = '5611db0c0a2b9d9ae1df8ddb8e540c65645ab8e9a4040e7ceabb4e524494c616'
AND (
token = '8PLVnYnBAyRzwfate3DoIvx9jCs/CspaskmZKMO5puo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)