UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '70auIhIu7DoYun1TFMLTG1clhbAdvUEv96QJipMgqz0='
WHERE
key_id = '279cb31733189db807edd1d745dc7753356b66ec801e95a64357210fc8646a94'
AND (
token = '70auIhIu7DoYun1TFMLTG1clhbAdvUEv96QJipMgqz0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)