UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3t/tqspJdmgaUnaVUlBZRZcMik7H114N+S9VJdLDRNQ='
WHERE
key_id = '4e00d6ff87044c2f449a8ab7ac669bb9c698d73d61477e1cd876d955fcd3462d'
AND (
token = '3t/tqspJdmgaUnaVUlBZRZcMik7H114N+S9VJdLDRNQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)