UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vzBGbCWtt93jJDiYMrVIb2gSOnqXLJO9vMypq75umoo='
WHERE
key_id = '91c8ee1303afc244234573c99024313af285ba52ab674d38c6466fca0dfd7766'
AND (
token = 'vzBGbCWtt93jJDiYMrVIb2gSOnqXLJO9vMypq75umoo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)