UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qXIZsx10IzWLNeFZDyFMUkwJej5LjqO553nKOrO+CcY='
WHERE
key_id = '154a1093de4a281debaaf6e7019af5d48460251a19aa2c45add6a2295c8a631f'
AND (
token = 'qXIZsx10IzWLNeFZDyFMUkwJej5LjqO553nKOrO+CcY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)