UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bjnOdUONyhb0yzqrOHDXvYG0v+jRdiZ2jKzUgD915AQ='
WHERE
key_id = '9d6eda9ae6e8c15d72f9628930771b78e1af86bcb8988dd7c19b778aaccaf54c'
AND (
token = 'bjnOdUONyhb0yzqrOHDXvYG0v+jRdiZ2jKzUgD915AQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)