UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'twV7CJsHmoHKzbQlyvwJJlmtQUQaJGpUcBfjnQL/9ec='
WHERE
key_id = '952949904b74760b3e6ff954be04773496f6733b42e529f07fd846b606779ff2'
AND (
token = 'twV7CJsHmoHKzbQlyvwJJlmtQUQaJGpUcBfjnQL/9ec='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)