UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/axpxaSqSQnbcpupU3QJHqNGPmSGutKetVZrbepU2Cc='
WHERE
key_id = '1b197beba75e4e6027bd2eb466cd5bbc72c075d323c54de6fbe72c67f8f03479'
AND (
token = '/axpxaSqSQnbcpupU3QJHqNGPmSGutKetVZrbepU2Cc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)