UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+OsC2mc9fOw7LI+E95MxkeGovBqjOJEzGQtxvrNCulk='
WHERE
key_id = '09060fa383ef47fd2d5ae9fb78804d5a8ca2afcbd151f292cfaf68f7fe059940'
AND (
token = '+OsC2mc9fOw7LI+E95MxkeGovBqjOJEzGQtxvrNCulk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)