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