UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yGABuz9fgcenOVaa48p2Y9Em3w1rRNXY3HuTVq+AZko='
WHERE
key_id = '318be89f811319062894516fadb67c290d55ca096698179aedeb5fe61212004b'
AND (
token = 'yGABuz9fgcenOVaa48p2Y9Em3w1rRNXY3HuTVq+AZko='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)