UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qKPSP2O2dOf/qwYRT/0R8xC2/gGowxB5BS7CYWjV4QM='
WHERE
key_id = '9d28ab2a4d4b62093147c0669ebf38b0d24bfff4abf990e03d5241d10193a3d9'
AND (
token = 'qKPSP2O2dOf/qwYRT/0R8xC2/gGowxB5BS7CYWjV4QM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)