UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uuZJbqKjTke0/Mqw2HRGcP9w9KmrhsNomNug0iFAjDI='
WHERE
key_id = '081b209fa9b4b03994538109aa9a83bb1c6d749d0c007e3d78958191ccfe4d8c'
AND (
token = 'uuZJbqKjTke0/Mqw2HRGcP9w9KmrhsNomNug0iFAjDI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)