UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iGCej5BPnlb9RH7/u8jQbZd3cabwOOCxNtbUVGmVr7o='
WHERE
key_id = '455e29312b6b01f0d532a826cb4838d541ed913f2b67aff0cf4033431c5b66d2'
AND (
token = 'iGCej5BPnlb9RH7/u8jQbZd3cabwOOCxNtbUVGmVr7o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)