UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aLDLnfRththN8Su7Jgk6Gt74QK/e1n7UVuEyCqra/qQ='
WHERE
key_id = '6b67c003da1190f38e914e664a07602f05f1705e116b000c68cc379dcebdf931'
AND (
token = 'aLDLnfRththN8Su7Jgk6Gt74QK/e1n7UVuEyCqra/qQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)