UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OqjZBNofht0z1DuGjZa3g+8nY0hLg9fy8Z8cDuGeOZ4='
WHERE
key_id = '92072a94749a3e8f2865f572765cf114e35154d9668cea3b4ed0d1bbb3ddcac5'
AND (
token = 'OqjZBNofht0z1DuGjZa3g+8nY0hLg9fy8Z8cDuGeOZ4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)