UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uF4sDJDM4ryZ94bgY/4TfIc4Oqp5LtvuafZk4dD1qtQ='
WHERE
key_id = '60531d4363fb26a4d92f448bc2f5b93f3ba315ad38202d1ea5d322ae6802be30'
AND (
token = 'uF4sDJDM4ryZ94bgY/4TfIc4Oqp5LtvuafZk4dD1qtQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)