UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Y3X2R5a3CV9hPQl86lSSTo/IBQqsDpp6U9zm9mWhbUQ='
WHERE
key_id = 'ca8f3759180c3e9342d8bba48d3627f9dcb2048eb1fcb6a5dd695152a2223a2d'
AND (
token = 'Y3X2R5a3CV9hPQl86lSSTo/IBQqsDpp6U9zm9mWhbUQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)