UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '15MjaXznnGLvTlKI1r0Ylh2sg1qTzJ/RMMdiBTNdSDE='
WHERE
key_id = '72015eb661a2370eefcb2a71c7f7beee500e5a4c3e5e4f72ff60b5191be5eb71'
AND (
token = '15MjaXznnGLvTlKI1r0Ylh2sg1qTzJ/RMMdiBTNdSDE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)