UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2zvQscnnkQRna/8P5S+d4pyglzuynKlqjJDLg6xhuyI='
WHERE
key_id = '78b2f1fd38bd0b98f10859076b2fffe8136bdcfb84c990932dd3fe241847e848'
AND (
token = '2zvQscnnkQRna/8P5S+d4pyglzuynKlqjJDLg6xhuyI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)